<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<content tag="buttons">
	<probiz:iconBtn btnType="save" onclick='saveAttribute();return false'/>
</content>
<div id="attributeDiv">
	<form:form method="post" id="attributeForm" commandName="attribute"
		action="${ctxPath}/attribute/attributeDefiner/dialog.html?doAction=save">
		<input type="hidden" name="attributeId" id="attributeId"
			value="${attribute.attributeId}" />
		<input type="hidden" name="attributeType"
			value="${attribute.attributeType}" />
		<%@include file="include/attributeDefinerDataType.jspf"%>
		<%@include file="include/attributeDefinerBasicInfo.jspf"%>
	</form:form>
</div>
<c:set var="ui_all_css" value="true" scope="request"/>
<c:set var="plugin_upload" value="true" scope="request"/>
<c:set var="ui_datepicker" value="true" scope="request"/>
<script type="text/javascript" defer>
var callbackFunc = eval("parent.${param.definerId}CallbackFunc");
$j(document).ready(function(){
     
     var attributeId = $j('#attributeId').val();
     $j("input[name='attributeDataType']").each(function(i){
        if($j(this).val()==${attribute.attributeDataType==null?11:attribute.attributeDataType}){
           $j(this)[0].checked=true;
        }
        if(attributeId != null && attributeId != ""){
              $j(this).attr('disabled','true');
        } 
     });
     applyValidate($("attributeName"),"required,maxlength=20");
     autoApplyValidate();
 });
</script>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/attribute/attributeDefiner.js?rs=${appConfig.rs}"></script>